package com.lanyou.esb.vo;

import java.util.List;

/**
 * 服务响应统计数据
 * 
 * @author Davey.wu
 */
public class IfResTimeVo {
	/** 总数 **/
	private long total;
	private List<IfGroup> IfGroups;

	public static class IfGroup implements Cloneable {
		/** 领域信息表名 **/
		private String fieldName;
		/** 系统表名 **/
		private String systemName;
		/** 接口名 **/
		private String ifName;
		/** 周期 **/
		private String period;
		/** 总平均响应时间 **/
		private double avg;
		/** 总最大响应时间 **/
		private double max;
		/** 引擎平均响应时间 **/
		private double esbAvg;
		/** 引擎最大响应时间 **/
		private double esbMax;

		public static IfGroup getInstance(String fieldName, String systemName,
				String ifName) {
			IfGroup ifGroup = new IfGroup();
			ifGroup.fieldName = fieldName;
			ifGroup.systemName = systemName;
			ifGroup.ifName = ifName;
			return ifGroup;
		}

		@Override
		public IfGroup clone() {
			IfGroup instance = null;
			try {
				instance = (IfGroup) super.clone();
			} catch (CloneNotSupportedException e) {
				instance = new IfGroup();
				instance.fieldName = this.fieldName;
				instance.systemName = this.systemName;
				instance.ifName = this.ifName;
			}
			return instance;
		}

		public String getPeriod() {
			return period;
		}

		public void setPeriod(String period) {
			this.period = period;
		}

		public double getAvg() {
			return avg;
		}

		public void setAvg(double avg) {
			this.avg = avg;
		}

		public double getMax() {
			return max;
		}

		public void setMax(double max) {
			this.max = max;
		}

		public String getFieldName() {
			return fieldName;
		}

		public void setFieldName(String fieldName) {
			this.fieldName = fieldName;
		}

		public String getSystemName() {
			return systemName;
		}

		public void setSystemName(String systemName) {
			this.systemName = systemName;
		}

		public String getIfName() {
			return ifName;
		}

		public void setIfName(String ifName) {
			this.ifName = ifName;
		}

		public double getEsbAvg() {
			return esbAvg;
		}

		public void setEsbAvg(double esbAvg) {
			this.esbAvg = esbAvg;
		}

		public double getEsbMax() {
			return esbMax;
		}

		public void setEsbMax(double esbMax) {
			this.esbMax = esbMax;
		}

	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public List<IfGroup> getIfGroups() {
		return IfGroups;
	}

	public void setIfGroups(List<IfGroup> ifGroups) {
		IfGroups = ifGroups;
	}
}
